# _*_ coding: utf-8 _*_
import json
'''数据由'''
class Field:
    name_, type_, size_ = None, None, None
    def __init__(self,name, type, size):
        self.name_=name
        self.type_=type
        self.size_=size

class tableStruct:
    name_, fields_, primaryKey_, foreignKey_=None, None, None, None
    def __init__(self,name,fields,primaryKey,foreignKey):
        self.name_=name
        self.fields_=fields
        self.foreignKey_=foreignKey
        self.primaryKey_=primaryKey

class Data:
    data_=None
    def __init__(self,data=None):
        self.data_=data

class Table:
    tableStruct_, tableData_= None, None
    def __init__(self,tablestruct, tabledata):
        self.tableStruct= tablestruct
        self.tableData_=tabledata

    def as_dict(self,Table_Name,Field, Field_Type):
        self.Table_Name=Table_Name
        self.Field=Field
        self.Field_Type=Field_Type
        #eturn self.data.as_dict()
    def get_Cloumn_Data(self,tableStruct, tableData):
        for field in tableStruct.fields_:
            print '{0:<10}'.format(field.name_),
        print
        for i in tableData.data_:
            print '{0:<10}'.format(i),
if __name__ == '__main__':
    table = Table(None,None)
    '''print json.dumps(table.as_dict("ff","dfd","fdfd"),indent=4)
    tablebuild=json.loads(json.dumps(table.as_dict("ff","dfd","fdfd")))
    print tablebuild
    table2 = Table()
    table2.__dict__ = tablebuild
    print table2.as_dict("ff","dfd","fdfd")'''
    fie = Field("fddfd","int",None)
    fi=Field("dfdfdfdd","int",None)
    f=[]
    f.append(fie)
    f.append(fi)
    f.append(fie)
    #data=Data(12)
    da=[12,13,13]
    data=Data(da)
    tables = tableStruct(None,f, None,None)
    table.get_Cloumn_Data(tables, data)